/**
*@Author:zt
*@Description: 角色权限相关接口
*@Date 2024-08-14
*/
import request from '@/http'
 // 分页查询
 export const page = async (data: object) => {
  return await request.post({
    url: '/authority/sysTRolepopedom/page',
    data:data,
  })
}
// 新增
export const add = async (data: object) => {
  return await request.post({
    url: '/authority/sysTRolepopedom',
    data: data
  })
}
// 给角色绑定功能模块
export const saveRoleModules = async (data: object) => {
  return await request.post({
    url: '/authority/sysTRolepopedom/saveRoleModules',
    data: data
  })
}

 // 根据角色查询相关的功能模块
 export const getRoleModules = async (data: object) => {
  return await request.get({
    url: '/authority/sysTRolepopedom/getRoleModules/'+data,
  })
}
 
 // 给角色绑定用户
 export const saveRoleUser = async (data: object) => {
  return await request.post({
    url: '/authority/sysTUserrole/saveRoleUser',
    data:data,
  })
}

 // 根据角色查询相关的功能模块
 export const getRoleUser = async (data: object) => {
  return await request.get({
    url: '/authority/sysTUser/role/'+data,
  })
}
 
 // 修改
 export const update = async (data: object) => {
  return await request.post({
    url: '/authority/sysTRolepopedom/update',
    data:data,
  })
}

 // 删除
 export const del = async (data: Array<any>) => {
  return await request.post({
    url: '/authority/sysTRolepopedom/delete',
    data,
    headersType: 'application/x-www-form-urlencoded'
  })
}

 // 查询单个数据
 export const singleQuery = async (data: any) => {
  return await request.get({
    url: '/authority/sysTRolepopedom/'+data
  })
}

 // 导出
export const download = async (data: object) => {
  return await request.download1({
    url: '/authority/sysTRolepopedom/export',
    data
  })
}










 
 




